package com.woniuxy.base.service.impl;


import com.woniuxy.base.mapper.BasePurityRecordMapper;
import com.woniuxy.base.model.entity.BasePurityRecord;
import com.woniuxy.base.service.BasePurityRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class BasePurityRecordServiceImpl implements BasePurityRecordService {
    @Resource
    private BasePurityRecordMapper recordMapper;
    @Override
    public void add(BasePurityRecord purityRecord) {
        recordMapper.insert(purityRecord);
    }

    @Override
    public List<BasePurityRecord> detail(Integer purityId) {
        Map<String,Object> condition = new HashMap<>();
        condition.put("purity_id", purityId);
        return recordMapper.selectByMap(condition);
    }
}
